package com.njust.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.njust.domain.dto.ProjectCreateDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @version 1.0
 * @Author Imak
 * @Date 2024/11/7 12:31
 * @项目表
 */
@TableName("project")
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class Project implements Serializable {
    private static final long serialVersionUID = -40356785423868312L;

    //主键
    @TableId(type = IdType.AUTO)
    private Integer project_id;

    //关联的产品id
    private Integer product_id;

    //项目名称
    private String project_name;

    //标准编号
    private String standard_number;
    
    public Project(ProjectCreateDTO projectCreateDTO) {
        this.product_id = projectCreateDTO.getProduct_id();
        this.project_name = projectCreateDTO.getProject_name();
        this.standard_number = projectCreateDTO.getStandard_number();
    }
}
